import request from "@/router/axios";
import { baseUrl } from "@/config/env";

//查询我的申请列表
export function getMyList(data) {
  return request({
    url: baseUrl + "/pc/flow/myList",
    method: "get",
    params: data
  });
}

// 新增、更新申报
const httpUrl = {
  // 证书
  certificate: "/pc/certificate-task",
  // 创新创业
  innovative: "/pc/innovative-undertaking-task",
  // 学生干部
  job: "/pc/job-task",
  // 公益活动
  public: "/pc/public-welfare-activities-task",
  // 好人好事
  goodThings: "/pc/good-things-task",
  // 德育
  moral: "/pc/moral-education-task",
  //学科竞赛 type:70
  course: "/pc/course-contests-task/",
  //文艺活动 type:80
  cultural: "/pc/cultural-activities-reward-task/",
  // 成绩查询
  queryGrades: "/pc/all/currentTerm",
  // 文化传播
  cluturalTransmission: "/pc/cultural-transmission-task/"
};

export function httpCheck(url, data, method) {
  return request({
    url: baseUrl + httpUrl[url],
    method,
    data
  });
}
